import { request } from '@boeyo/portal';

/**
 * 分组选择下拉列表
 * @ss.hasPermi('serverAssetGroup:selectList')
 */
export const groupSelectList = (params?) => {
  return request({
    url: '/serverAssetGroup/selectList',
    method: 'GET',
    params,
  });
};

/**
 * 主机下拉列表
 * @ss.hasPermi('serverAssetBizHost:selectList')
 */
export const selectList = (params?) => {
  return request({
    url: '/serverAssetBizHost/selectList',
    method: 'GET',
    params,
  });
};

/**
 * 查询分组下关联主机
 * @ss.hasPermi('serverAssetGroup:queryBizHostByGroup')
 */
export const queryBizHostByGroup = (groupId) => {
  return request({
    url: `/serverAssetGroup/queryBizHostByGroup/${groupId}`,
    method: 'GET',
  });
};

/**
 * 修改分组
 * @ss.hasPermi('serverAssetGroup:update')
 */
export const groupUpdate = (data) => {
  return request({
    url: '/serverAssetGroup/update',
    method: 'PUT',
    data,
  });
};
